<template>
  <el-menu
    default-active="1-1"
    class="el-menu-vertical-demo"
    background-color="#31525b"
    text-color="#fff"
    active-text-color="#ffd04b"
    id="menu"
  >
    <el-submenu index="1">
      <template slot="title">
        <i class="el-icon-tickets"></i>
        <span>题目管理</span>
      </template>
      <el-menu-item index="1-1" @click="goRoute({name:'problem'})">所有题目</el-menu-item>
      <el-menu-item index="1-2" @click="goRoute({name:'problemAdd'})">新增题目</el-menu-item>
      <el-menu-item index="1-3" @click="goRoute({name:'problemAuditList'})">审核列表</el-menu-item>
    </el-submenu>
    <el-submenu index="2">
      <template slot="title">
        <i class="el-icon-reading"></i>
        <span>试卷管理</span>
      </template>
      <el-menu-item index="2-1" @click="goRoute({name:'exam'})">所有试卷</el-menu-item>
      <el-menu-item index="2-2" @click="goRoute({name:'examAdd'})">新增试卷</el-menu-item>
    </el-submenu>
    <el-submenu index="3">
      <template slot="title">
        <i class="el-icon-collection-tag"></i>
        <span>标签管理</span>
      </template>
      <el-menu-item index="3-1" @click="goRoute({name:'tag'})">所有标签</el-menu-item>
      <!-- <el-menu-item index="3-2">新增标签</el-menu-item> -->
    </el-submenu>
    <el-submenu index="4">
      <template slot="title">
        <i class="el-icon-user"></i>
        <span>用户管理</span>
      </template>
      <el-menu-item index="4-1" @click="goRoute({name:'userManage'})">所有用户</el-menu-item>
      <!-- <el-menu-item index="3-2">新增标签</el-menu-item> -->
    </el-submenu>
  </el-menu>
</template>

<script>
export default {
  methods:{
    goRoute(location){
      console.log(this)
      this.$router.push(location)
    }
  },
  
};
</script>
<style scoped>
#menu {
  height: 100%;
  position: fixed;
  width: 200px;

  /* background-image:url("../assets/images/纹理2.jpg") !important; */
  background-size: contain;

  background: #285185;
  /* height: 1020px; */
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
.el-submenu .el-menu-item {
  min-width: 100px !important;
}

</style>